package com.rzn.reading.mapper;

import com.rzn.reading.entity.LiteratureDetail;
import com.rzn.reading.entity.ReadingProgress;
import com.rzn.reading.model.dto.readingProgress.IsReadingLiteratureDTO;
import org.apache.ibatis.annotations.Mapper;

import java.util.List;
@Mapper
public interface ReadingProgressMapper {
    int deleteByPrimaryKey(Integer id);

    int insert(ReadingProgress record);

    ReadingProgress selectByPrimaryKey(Integer id);

    List<ReadingProgress> selectAll();

    int updateByPrimaryKey(ReadingProgress record);

    ReadingProgress selectByUserIdAndLiteratureId(Integer userId, Integer literatureId);

    Integer deleteByLiteratureId(Integer literatureId);

    List<IsReadingLiteratureDTO> getIsReadingLiterature(Integer userId);

    Integer deleteLiteratureProgress(Integer userId,Integer literatureId);

    Integer updateLiteratureProgressState(Integer id,Integer state);
}